<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Supported REST parameters | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'sql-rest-fields.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/sql-rest-fields.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/sql-rest-fields.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/sql-rest-fields.html" rel="nofollow" target="_blank">../en/sql-rest-fields.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="xpack-sql.html">SQL access</a></span>
»
<span class="breadcrumb-link"><a href="sql-rest.html">SQL REST API</a></span>
»
<span class="breadcrumb-node">Supported REST parameters</span>
</div>
<div class="navheader">
<span class="prev">
<a href="sql-rest-params.html">« Passing parameters to a query</a>
</span>
<span class="next">
<a href="sql-translate.html">SQL Translate API »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="sql-rest-fields"></a>Supported REST parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/sql/endpoints/rest.asciidoc">edit</a>
</h2>
</div></div></div>
<p>In addition to the <code class="literal">query</code> and <code class="literal">fetch_size</code>, a request a number of user-defined fields for specifying
the request time-outs or localization information (such as timezone).</p>
<p>The table below lists the supported parameters:</p>
<div class="informaltable">
<table border="1" cellpadding="4px">
<colgroup>
<col class="col_1">
<col class="col_2">
<col class="col_3">
</colgroup>
<tbody>
<tr>
<td align="center" valign="top"><p><span class="strong strong"><strong>name</strong></span></p></td>
<td align="center" valign="top"><p><span class="strong strong"><strong>Default value</strong></span></p></td>
<td align="center" valign="top"><p><span class="strong strong"><strong>Description</strong></span></p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">query</code></p></td>
<td align="center" valign="top"><p><code class="literal">Mandatory</code></p></td>
<td align="center" valign="top"><p>SQL query to execute</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">fetch_size</code></p></td>
<td align="center" valign="top"><p><code class="literal">1000</code></p></td>
<td align="center" valign="top"><p>The maximum number of rows (or entries) to return in one response</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">filter</code></p></td>
<td align="center" valign="top"><p><code class="literal">none</code></p></td>
<td align="center" valign="top"><p>Optional Elasticsearch query DSL for additional <a class="xref" href="sql-rest-filtering.html" title="Filtering using Elasticsearch query DSL">filtering</a>.</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">request_timeout</code></p></td>
<td align="center" valign="top"><p><code class="literal">90s</code></p></td>
<td align="center" valign="top"><p>The timeout before the request fails.</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">page_timeout</code></p></td>
<td align="center" valign="top"><p><code class="literal">45s</code></p></td>
<td align="center" valign="top"><p>The timeout before a pagination request fails.</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">time_zone</code></p></td>
<td align="center" valign="top"><p><code class="literal"><code class="literal">Z</code> (or <code class="literal">UTC</code>)</code></p></td>
<td align="center" valign="top"><p>Time-zone in ISO 8601 used for executing the query on the server.
More information available <a href="https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html" class="ulink" target="_top">here</a>.</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">columnar</code></p></td>
<td align="center" valign="top"><p><code class="literal">false</code></p></td>
<td align="center" valign="top"><p>Return the results in a columnar fashion, rather than row-based fashion. Valid for <code class="literal">json</code>, <code class="literal">yaml</code>, <code class="literal">cbor</code> and <code class="literal">smile</code>.</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">field_multi_value_leniency</code></p></td>
<td align="center" valign="top"><p><code class="literal">false</code></p></td>
<td align="center" valign="top"><p>Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order).</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">index_include_frozen</code></p></td>
<td align="center" valign="top"><p><code class="literal">false</code></p></td>
<td align="center" valign="top"><p>Whether to include <a class="xref" href="frozen-indices.html" title="Frozen indices">frozen-indices</a> in the query execution or not (default).</p></td>
</tr>
<tr>
<td align="center" valign="top"><p><code class="literal">params</code></p></td>
<td align="center" valign="top"><p><code class="literal">none</code></p></td>
<td align="center" valign="top"><p>Optional list of parameters to replace question mark (<code class="literal">?</code>) placeholders inside the query.</p></td>
</tr>
</tbody>
</table>
</div>
<p>Do note that most parameters (outside the timeout and <code class="literal">columnar</code> ones) make sense only during the initial query - any follow-up pagination request only requires the <code class="literal">cursor</code> parameter as explained in the <a class="xref" href="sql-pagination.html" title="Paginating through a large response">pagination</a> chapter.
That’s because the query has already been executed and the calls are simply about returning the found results - thus the parameters are simply ignored.</p>
</div>
<div class="navfooter">
<span class="prev">
<a href="sql-rest-params.html">« Passing parameters to a query</a>
</span>
<span class="next">
<a href="sql-translate.html">SQL Translate API »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>